/*************************************************
filename	: system_timer.h
author		: Stefan lulham
desc		: System timer
*************************************************/
#ifndef D_SYSTEM_TIMER_H
#define D_SYSTEM_TIMER_H

#undef GetCurrentTime
#undef GetTickCount

#include "platform.h"

#if defined (DELGE_PLATFORM_WIN32)
#include <modules\system\win32\win32_system_timer.h>
#define InterfaceSystemTimer			Win32SystemTimer
#endif

namespace DelGE
{
	namespace Modules
	{
		namespace System
		{
			class SystemTimer
			{
			private:
				InterfaceSystemTimer *pInterface;

			public:
				SystemTimer();
				~SystemTimer();

				void Start();
				void Stop();

				float GetDeltaTime();
				float GetStartTime();
				float GetEndTime();
				float GetCurrentTime();

				void Restart();

				InterfaceSystemTimer* GetInterfaceTimer() const;
			};

			bool operator ==(const SystemTimer &pTimer0, const SystemTimer &pTimer1);
			bool operator !=(const SystemTimer &pTimer0, const SystemTimer &pTimer1);
		}
	}
}

#endif